package com.jk.bglog.controller;

import com.jk.bglog.entity.OrderLogEntity;
import com.jk.bglog.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("order")
public class OrderController {
    @Autowired
    private OrderService orderService;


    /**
     * 订单表的查询
     * @param OrderLogEntity
     * @return
     */
    @RequestMapping("queryOrderList")
    public List<OrderLogEntity>queryOrderList(OrderLogEntity OrderLogEntity){

        return orderService.queryOrderList(OrderLogEntity);
    }

    /**
     * @description: 新增创建表所用
     * @param: [OrderLogEntity]
     * @return: void
     * @author Liu
     * @date: 2021/9/1 14:00
     */
    @RequestMapping("addOrder")
    public void addOrder(@RequestBody OrderLogEntity OrderLogEntity){

        orderService.addOrder(OrderLogEntity);
    }




}
